<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>vue学习</title>
    <script src="./js/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <input type="text" :key="keyname" />
      <button @click="setKey">修改一下key</button>
    </div>
    <script>
      const app = Vue.createApp({
        data() {
          return {
            keyname: 'aa'
          }
        },
        methods: {
          setKey() {
            this.keyname = 'bb'+Date.now()
          }
        }
      })
      app.mount('#app')
    </script>
  </body>
</html>
